import * as XLSX from "xlsx";
import {saveAs} from 'file-saver';

export const exportHandleXlsx = (name) => {
    const data = XLSX.utils.table_to_book(document.querySelector('.el-table'))
    const wabout = XLSX.write(data, {
        bookType: 'xlsx',
        bookSST: true,
        type: 'array'
    })
    saveAs(new Blob([wabout], {
        type: 'application/octet-stream'
    }), `${name}.xlsx`)
}